<div class="aw-side" id="aw-side">
    <div class="mod">
        <div class="mod-logo">
            <img class="pull-left" src="__PUBLIC__/admin/img/logo.png" alt="" />
            <h1>豆信3.0</h1>
        </div>

        <div class="mod-message">
            <div class="message">
                <a class="btn btn-sm" href="{:U('Wechat/Index/index')}" title="公众号首页">
                    <i class="icon icon-home"></i>
                </a>

                <a class="btn btn-sm" href="{:U('Wechat/Index/lists')}" title="公众号列表">
                    <i class="icon icon-ul"></i>
                </a>

                <a class="btn btn-sm" href="{:U('Admin/Index/index')}" title="系统功能">
                    <i class="icon icon-setting"></i>
                </a>
            </div>
        </div>
        
        <block name="sidenav">
            <ul class="mod-bar" >
                <li>
                    <a href="{:U('Index/index')}" class=" icon icon-home">
                        <span>首页</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" class=" icon icon-setting" data="icon">
                        <span>基础功能</span>
                    </a>
                    <ul class="hide">
                        <li>
                            <a href="{:U('AutoReply/keyword')}">
                                <span>自动回复</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('CustomMenu/normal_lists')}">
                                <span>自定义菜单</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('MassSend/send')}">
                                <span>群发功能</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('CustomerService/setting')}">
                                <span>客服功能</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" class=" icon icon-setting" data="icon">
                        <span>管理功能</span>
                    </a>
                    <ul class="hide">
                        <li>
                            <a href="{:U('Fans/lists')}">
                                <span>粉丝管理</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Message/lists')}">
                                <span>消息管理</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Material/news_lists')}">
                                <span>素材管理</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" class=" icon icon-setting" data="icon">
                        <span>微站功能</span>
                    </a>
                    <ul class="hide">
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>微站管理</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>文章管理</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>页面管理</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>幻灯片管理</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>模板管理</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" class=" icon icon-setting" data="icon">
                        <span>扩展功能</span>
                    </a>
                    <ul class="hide">
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>微订餐</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>微商城</span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Admin/Model/lists')}">
                                <span>微投票</span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </block>

    </div>
</div>

<script type="text/javascript">
var controller = "<php>echo CONTROLLER_NAME;</php>";        // 获取当前控制器
var active_a = $("a[href*='"+controller+"']");              // 获取链接中包含当前控制器的a标签
var active_ul = active_a.parent("li").parent("ul");         // 获取需要显示的ul标签
var active_wrap = active_ul.siblings("a");                  

active_a.addClass("active");
active_ul.removeClass("hide");
active_wrap.addClass("active");

</script>


